<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/include/taglibs.jsp"%>

      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><span class="blueb">※</span><strong> 객실예약 확인</strong>
<c:if test="${reservationList !=null && fn:length(reservationList)>0 }">
	<select name="rm_no" onchange="">
	<c:forEach var="map1" items="${reservationList}" varStatus="status">
		<option value="${map1.rm_no }">${map1.reservation_nm }(${fn:substring(map1.reg_dt,2,4) }.${fn:substring(map1.reg_dt,4,6) }.${fn:substring(map1.reg_dt,6,8) })</option>
	</c:forEach>
	</select>
</c:if>
          </td>
        </tr>
        <tr>
          <td height="5"></td>
        </tr>
        <tr>
          <td>
<!-- 예약객실 목록 -->
<table width="100%" border="0" cellspacing="4" cellpadding="1"
	bgcolor="#edecec">
	<tr>
		<td bgcolor="#FFFFFF"><table width="100%" border="0"
				cellspacing="0" cellpadding="0">
				<tr align="center">
					<td width="10%" height="35" bgcolor="#fc636a"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="whiteb2">객실명</td>
							</tr>
						</table></td>
					<td width="14%" bgcolor="#fc636a" class="borderlw"><table
							width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr align="center">
								<td height="18" class="whiteb2">이용일자</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#FFFFFF"></td>
							</tr>
							<tr align="center">
								<td height="16" class="whiteb2">예약일자</td>
							</tr>
						</table></td>
					<td width="9%" bgcolor="#fc636a" class="borderlw"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="whiteb2">이용기간</td>
							</tr>
						</table></td>
					<td width="10%" bgcolor="#fc636a" class="borderlw"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="whiteb2">기준/예약</td>
							</tr>
						</table></td>
					<td width="13%" bgcolor="#fc636a" class="borderlw"><table
							width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td height="18" colspan="2" align="center"><table
										border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td align="center" class="whiteb2" style="padding-top: 2px;">예약인원</td>
										</tr>
									</table></td>
							</tr>
							<tr>
								<td height="1" colspan="2" bgcolor="#FFFFFF"></td>
							</tr>
							<tr align="center">
								<td width="50%" height="16"><table border="0"
										cellspacing="0" cellpadding="0">
										<tr>
											<td align="center" class="whiteb2" style="padding-top: 2px;">성인</td>
										</tr>
									</table></td>
								<td width="50%" class="borderlw"><table border="0"
										cellspacing="0" cellpadding="0">
										<tr>
											<td align="center" class="whiteb2" style="padding-top: 2px;">아동</td>
										</tr>
									</table></td>
							</tr>
						</table></td>
					<td width="11%" bgcolor="#fc636a" class="borderlw"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="whiteb2">기본요금</td>
							</tr>
						</table></td>
					<td width="11%" bgcolor="#fc636a" class="borderlw"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="whiteb2">추가요금</td>
							</tr>
						</table></td>
					<td width="10%" bgcolor="#fc636a" class="borderlw"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="whiteb2">할인요금</td>
							</tr>
						</table></td>
					<td width="12%" bgcolor="#fc636a" class="borderlw"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="whiteb2">합계</td>
							</tr>
						</table></td>
				</tr>
				<tr>
					<td height="1" colspan="9" bgcolor="#FFFFFF"></td>
				</tr>
<c:if test="${list !=null && fn:length(list)>0 }">
	<c:set var="room_nm_tmp" value=""/>
	<c:forEach var="map1" items="${list}" varStatus="status">
				<tr align="center">
<%-- 			<c:if test="${status.index==0 }"> --%>
<%-- 					<td height="30" bgcolor="#ffffff" class="borderbg" rowspan="${map1.rowspan }"><table --%>
<c:if test="${room_nm_tmp!= map1.room_nm}">
						<td height="30" bgcolor="#ffffff" class="borderbg"  rowspan="${map1.rowspan }"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">${map1.room_nm } </td>
							</tr>
						</table></td>
	<c:set var="room_nm_tmp" value="${map1.room_nm }"/>
</c:if>

<%-- 			</c:if> --%>

					<td bgcolor="#ffffff" class="borderlbg"><table width="100%"
							border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td align="center" class="greenb2">
<%-- 								${fn.substring(map1.nowdt,,4) } --%>

${fn:substring(map1.reservation_dt,2,4) }년
${fn:substring(map1.reservation_dt,4,6) }월
${fn:substring(map1.reservation_dt,6,8) }일
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#c0c0bf"></td>
							</tr>
							<tr>
								<td align="center" class="greenb2">
${fn:substring(map1.nowdt,0,4) }년
${fn:substring(map1.nowdt,4,6) }월
${fn:substring(map1.nowdt,6,8) }일
								</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">1박</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">${map1.use_man_cnt }/${map1.totalMan }</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table width="100%"
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td height="30" align="center" class="greenb2">
									<!--0-->
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="50%" height="30" align="center"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2">${map1.man_cnt }명</td>
													</tr>
												</table></td>
											<td width="50%" align="center" class="borderlg"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2">${map1.chi_cnt }명</td>
													</tr>
												</table></td>
										</tr>
									</table>
								</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2"><fmt:formatNumber value="${map1.pay }" pattern="#,###"/>원</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2"><fmt:formatNumber value="${map1.pay_man_m }" pattern="#,###"/>원</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2"><fmt:formatNumber value="${map1.dc_pay }" pattern="#,###"/>원</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2"><span id="total_price"><fmt:formatNumber value="${map1.pay+map1.pay_man_m-map1.dc_pay }" pattern="#,###"/>원</td>
							</tr>
						</table></td>
				</tr>
	</c:forEach>
</c:if>
			</table>
			</td>
	</tr>
</table>
<!-- 예약객실 목록 끝 -->

<!-- 부가서비스 예약 -->
<c:if test="${rtAddSvcList !=null && fn:length(rtAddSvcList)>0 }">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td><span class="blueb">※</span><strong> 부가서비스 확인</strong></td>
				</tr>
				<tr>
					<td height="5"></td>
				</tr>
				<tr>
					<td><table width="100%" border="0" cellspacing="4"
							cellpadding="1" bgcolor="#edecec">
							<tr>
								<td bgcolor="#FFFFFF"><table width="100%" border="0"
										cellspacing="0" cellpadding="0">
										<tr align="center">
											<td width="17%" height="35" bgcolor="#4da6fa"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="whiteb2">서비스명</td>
													</tr>
												</table></td>
											<td width="13%" bgcolor="#4da6fa" class="borderlw"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="whiteb2">주문수</td>
													</tr>
												</table></td>
											<td width="41%" bgcolor="#4da6fa" class="borderlw"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="whiteb2">요구사항</td>
													</tr>
												</table></td>
											<td width="13%" bgcolor="#4da6fa" class="borderlw"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="whiteb2">가격</td>
													</tr>
												</table></td>
											<td width="16%" bgcolor="#4da6fa" class="borderlw"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="whiteb2">합계</td>
													</tr>
												</table></td>
										</tr>
										<tr>
											<td height="1" colspan="5" bgcolor="#FFFFFF"></td>
										</tr>
	<c:forEach var="map1" items="${rtAddSvcList}" varStatus="status">
										<tr align="center">
											<td height="30" bgcolor="#ffffff"><table border="0"
													cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2">${map1.as_nm }</td>
													</tr>
												</table></td>
											<td bgcolor="#ffffff" class="borderlg"><table border="0"
													cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2">${map1.use_cnt }${map1.as_unit }</td>
													</tr>
												</table></td>
											<td bgcolor="#ffffff" class="borderlg"><table border="0"
													cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2">${map1.req_msg }</td>
													</tr>
												</table></td>
											<td bgcolor="#ffffff" class="borderlg"><table border="0"
													cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2"><fmt:formatNumber value="${map1.as_pay }" pattern="#,###"/>원</td>
													</tr>
												</table></td>
											<td bgcolor="#ffffff" class="borderlg"><table border="0"
													cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2"><fmt:formatNumber value="${map1.totalPay }" pattern="#,###"/>원</td>
													</tr>
												</table></td>
										</tr>
	</c:forEach>
									</table></td>
							</tr>
						</table></td>
				</tr>
			</table>
</c:if>          
<!-- 부가서비스 예약 끝 -->
          </td>
        </tr>
      </table>
<!-- rtAddSvcList -->
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><table width="100%" border="0" cellspacing="4" cellpadding="1" bgcolor="#edecec">
              <tr>
                <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr align="center">
                      <td width="62%" height="35" bgcolor="#fafc98"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="dgrayb">구분</td>
                          </tr>
                        </table></td>
                      <td width="38%" bgcolor="#fafc98" class="borderlb"><table border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td align="center" class="dgrayb">금액</td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr>
                      <td height="1" colspan="2" bgcolor="#C0C0BF"></td>
                    </tr>
                    <tr align="center">
                      <td height="30" bgcolor="#ffffff" class="borderbg"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="greenb2">객실기본요금합계</td>
                          </tr>
                        </table></td>
                      <td bgcolor="#ffffff" class="borderlbg"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="greenb2"><fmt:formatNumber value="${totalPayD1 }" pattern="#,###"/>원 </td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr align="center">
                      <td height="30" bgcolor="#ffffff" class="borderbg"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="greenb2">추가요금합계</td>
                          </tr>
                        </table></td>
                      <td bgcolor="#ffffff" class="borderlbg"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="greenb2"><fmt:formatNumber value="${addPay }" pattern="#,###"/>원</td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr align="center">
                      <td height="30" bgcolor="#ffffff" class="borderbg"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="greenb2">부가서비스요금 합계</td>
                          </tr>
                        </table></td>
                      <td bgcolor="#ffffff" class="borderlbg"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="blueb"><span class="greenb2"><fmt:formatNumber value="${totalPayD2 }" pattern="#,###"/>원</span></td>
                          </tr>
                        </table></td>
                    </tr>
										<span style="display:none">
					<input name="usepoint" type="text" id="usepoint">
					<input type="checkbox" name="checkAllpoint" id="checkAllpoint" onclick="this.form.usepoint.value=mypoint">
					</span>
					                    <tr align="center">
                      <td height="30" bgcolor="#ffffff"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="greenb2">결제금액</td>
                          </tr>
                        </table></td>
                      <td bgcolor="#ffffff" class="borderlg"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="redb"><span id="total_payprice"><fmt:formatNumber value="${totalPay }" pattern="#,###"/></span>원</td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table>